class Component extends HTMLElement {
    static get TAG_NAME() {
        return 'component-tag-name';
    };

    constructor() {
        super();
        const shadow = this.attachShadow({ mode: 'closed' });
        fetch("./1.html").then(res => res.text()).then(data => {
            // var tmp = document.createDocumentFragment();
            // tmp.innerHTML = data;
            // console.dir(tmp);
            // document.body.append(tmp);
            // var domParser = new DOMParser();
            // var doc = domParser.parseFromString(data, "text/html")
            // var tmp = doc.querySelector('template');
            // console.dir(tmp);
            // var content = tmp.content.cloneNode(true)
            // shadow.appendChild(content);
            shadow.innerHTML = data;
        })
    }
}

customElements.define(Component.TAG_NAME, Component);